package org.example.domain.system.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;


@Data
public class UserLoginReq {
    @Schema(description = "用户名")
    @Size(max = 30, min = 3, message = "用户名长度应在3～30位字符内")
    private String userName;
    @Schema(description = "密码")
    //@Size(max = 20, min = 8, message = "密码长度应在8～20位字符内")
    @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[@#$%^&+=!]).{8,20}$", message = "密码必须包含数字、字母、特殊字符，并且长度在8到20个字符之间")
    private String password;
    @Schema(description = "登录方式")
    private String loginType;
}
